//
//  BLHomeCollectionViewCell.m
//  blanket
//
//  Created by Mac on 2017/12/5.
//  Copyright © 2017年 stoneobs@icloud.com. All rights reserved.
//

#import "BLHomeCollectionViewCell.h"
@interface BLHomeCollectionViewCell()
@property(nonatomic, strong) UIImageView                     *imageView;
@property(nonatomic, strong) STLabel                         *titleLable;
@end

@implementation BLHomeCollectionViewCell
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self configSubView];
    }
    return self;
}
+ (CGFloat)cellHeight{
    return 85;
}
#pragma mark --subView
- (void)configSubView{
 
    self.imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 15, 50, 50)];
    self.imageView.centerX = UIScreenWidth / 8;
    self.imageView.image = [UIImage imageNamed:@""];
    [self addSubview:self.imageView];
    
    self.titleLable = [[STLabel alloc] initWithFrame:CGRectMake(0, self.imageView.bottom + 3, UIScreenWidth / 4, 20)
                                                     text:@""
                                                textColor:BL_firstTextColor
                                                     font:13
                                              isSizetoFit:NO
                                            textAlignment:NSTextAlignmentCenter];
    [self addSubview:self.titleLable];
}
- (void)setModel:(BLHomeCollectionViewModel *)model{
    _model = model;
    self.imageView.image = [UIImage imageNamed:model.imageName];
    self.titleLable.text = model.titleName;
}
@end
